home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d27 / cliup01.arc / CLISW.TXT < prev    next >
Text File  |  1991-05-05  |  23KB  |  545 lines

  1.  
  2.  
  3.  
  4.                                 
  5.                   ESHEC Software
  6.  
  7.           Command Line Interface
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.                          Table Of Contents
  17.  
  18.  
  19. I.   Introduction ................................................. 1
  20. II.  Program Abstract ............................................. 1
  21.      What is CLI? ................................................. 1
  22.      What does CLI do for me? ..................................... 1
  23.      How do I install and startup CLI? ............................ 2
  24.      Some definitions before we begin ............................. 3
  25.      Notes ........................................................ 3
  26.      The CLI command line ......................................... 4
  27. III.  CLI Commands ................................................ 5
  28.      CLEAR ........................................................ 5
  29.      DEFINE ....................................................... 5
  30.          LOGICAL .................................................. 5
  31.          SYMBOL ................................................... 6
  32.          VERIFY ................................................... 6
  33.      DOS .......................................................... 6
  34.      EXIT (QUIT) .................................................. 6
  35.      GETFL (@)  ................................................... 6
  36.      RECALL ....................................................... 6
  37.      SHOW ......................................................... 6
  38.          CORE ..................................................... 6
  39.          DATE ..................................................... 6
  40.          ENVIRONMENT .............................................. 6
  41.          LOGICAL .................................................. 7
  42.          SYMBOL ................................................... 7
  43.          TIME ..................................................... 7
  44.          VERSION .................................................. 7
  45.      SD ........................................................... 7
  46. IV. Notes ......................................................... 8
  47. V.   Appendix A.  Some examples ................................... 9
  48. VI.  Appendex B.   CLI and DESQview ............................... 10
  49. VII. Appendix C.   CLI knows problems ............................. 11
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.                            Introduction
  58.  
  59.      Thank  you  for  your interest in ESHEC Software. ESHEC  software  is  a 
  60. company  committed  to  providing quality  shareware  software  at  reasonable 
  61. prices.  The software you have obtained is shareware. It is NOT  freeware  nor 
  62. has  it been placed in the public domain. We at ESHEC software believe in  the 
  63. shareware process and have thus made CLI available. You are granted a  limited 
  64. right  to use license for a period of thirty days, after which time  you  must 
  65. discontinue  use  or register. We hope you enjoy using CLI  during  your  free 
  66. trial period. If you like it, tell your friends, if not please tell us. 
  67.  
  68.  
  69.  
  70.                            What is CLI?
  71.  
  72.      CLI  is a DOS Command Line Interface program that extends the  capabili-
  73. ties  of the DOS command line. CLI is NOT and was never intended to be  a  DOS 
  74. shell  program. If you are the type of PC user that almost never uses the  DOS 
  75. command  line or are new to the PC then CLI can help you during  the  learning 
  76. process.  On the other hand, if you are an experienced user and find  yourself 
  77. frequently using DOS then the power of CLI shines. CLI was written because the 
  78. developers at ESHEC, who are consultants and teachers in data processing,  use 
  79. DOS  commands regularly when assisting clients and students. They were  unable 
  80. to find a command line enhancer that they liked - so they wrote their own.
  81.  
  82.  
  83.                       What does CLI do for me? 
  84.  
  85.      CLI  extends  the DOS command line by providing:  command  line  editing 
  86. capabilities  (both insert and overstrike toggled by the INSERT key),  command 
  87. line  recall (using the up and down arrows or popup menu  selection),  command 
  88. string  pre-definitions with parameters, command chaining, logged  device  and 
  89. working  directory change, and program launching. You can also: add or  remove 
  90. directories  from your current path, launch programs without starting  another 
  91. copy  of COMMAND.COM, and terminate CLI at any time (CLI is NOT written  as  a 
  92. TSR).
  93.  
  94.      CLI helps the new user to DOS by allowing you to customize DOS  commands 
  95. that  you  may find confusing or to complex to remember.  CLI  allows  you  to 
  96. assign  your  own name to any DOS command. Every user of a DOS  based  machine 
  97. will  at  sometime be faced with having to use DOS commands. While  there  are 
  98. many great shell programs on the market that attempt to make this  infrequent, 
  99. the time will come that the only way out of a problem is to go down to the DOS 
  100. level.  The less you use something the more confusing its use becomes,  that's 
  101. where  CLI comes in. By allowing you to associate your own names to  commands, 
  102. names which you are more likely to remember, this confusion is eliminated. CLI 
  103. lets YOU make the choice. For example, suppose you need to format a low densi-
  104. ty  3.5" floppy in a high density drive. What is the DOS command to  do  that? 
  105. Assume that your 3.5" drive is drive B one option is:
  106.  
  107.           FORMAT B: /n:9 /t:80
  108.  
  109. Who can possibly remember that?? (Never mind that, who would WANT to  remember 
  110. that??). Using CLI it is possible to give that entire command a name and  from 
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117. that point on, using the new name, CLI will know that you want to format a low 
  118. density  3.5"  floppy in high density drive B. When you get  to  the  advanced 
  119. options,  you'll  see  that it is also possible to create  generic  names  and 
  120. specify  options when you use them. The new names that you create  are  called 
  121. SYMBOLS.  We  call them symbols because they are in effect  synonyms  for  the 
  122. actual commands. 
  123.  
  124.  
  125.  
  126.  
  127.  
  128.                   How do I install and startup CLI?
  129.  
  130.      CLI requires two files:
  131.  
  132.           CLISW.EXE       Program file.
  133.           CLISETUP.DAT     File to hold command string pre-definitions.
  134.  
  135.      These  two files should be on the distribution. If not, DO NOT  USE  the 
  136. copy  of  CLI you have obtained and contact ESHEC Software. Copy both  to  the 
  137. same  directory.  It may be any directory you wish, although we  do  recommend 
  138. that it be included on your PATH statement. For example:
  139.  
  140.                COPY A:\CLI*.* C:\BIN
  141.  
  142. If  you  have downloaded CLI from a BBS, CLI has been provided as  an  archive 
  143. file. The two required files and this DOC file are all in the archive.
  144.  
  145.      To start CLI, simply type CLISW at the DOS command line and enjoy!
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.                          Some definitions
  153.  
  154.      In  order to use the full potential of CLI, you must understand some  of 
  155. the terms used through out this document and how CLI looks at these terms.
  156.  
  157.      1.   KEYWORD    The portion of the command line CLI considers to be
  158.                     the command. The keyword is the sequence
  159.                     of characters on the command line until the first
  160.                     space is found. For example in the following string
  161.                     LI is considered the keyword:
  162.                          LI myfile.txt
  163.  
  164.      2.   SYMBOL     A name given to a pre-defined character string.
  165.                     Symbols  may be used in place of a keyword or
  166.                     may be used as part of the keyword parameters.
  167.  
  168.      2.   Logical    A name given to a pre-defined character string
  169.                     that contains a device and directory path. Logical
  170.                     names may be used anywhere a device and directory
  171.                     path would be specified.
  172.  
  173.      4.   Parameter  An object operated upon by the keyword. For example
  174.                     in the keyword example above, myfile.txt is the
  175.                     parameter. 
  176.  
  177. Other things worth noting:
  178.  
  179.      1.   Parameters are separated from their  keywords by at least one
  180.           space.
  181.      2.   Parameters are separated from each other by at least one space.
  182.      3.   When logical names are used in the parameter string (except
  183.           on the SHOW command) they must be followed by a colon. For
  184.           example: if C_BIN and D_BIN are logical names defined as
  185.           c:\bin and d:\bin respectively, then in order to use the
  186.           logical names in a DOS copy operation you would key the line
  187.           as follows:
  188.  
  189.                > copy c_bin:myfile.txt d_bin:myfile.txt      or
  190.                > copy c_bin:myfile.txt d_bin     (note no colon needed
  191.                                                   after d_bin in this
  192.                                                   example)
  193.      4.   A symbol lookup is always done for keywords, therefore no
  194.           special indication need be given to use a symbol as a command.
  195.      5.   Symbols may also be defined as translating to a device and
  196.           directory path, but symbol names may not be used in place
  197.           of logical names.
  198.      6.   Symbols values may be used in the parameter portion of the
  199.           command line if the symbol name is enclosed in apostrophes.
  200.           For example: if FL is a symbol that translates to
  201.           c:\t\tc\bin\tc.exe, then the following command would copy
  202.           c:\t\tc\bin\tc.exe to the current working directory:
  203.  
  204.                copy 'fl'
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.                         The CLI command line
  212.  
  213.  
  214.      CLI looks at the command line as two parts. The first part (delimited by 
  215. a  space) is called the keyword (or command) and the second part (the rest  of 
  216. the  command line) is considered the parameters to the keyword. The logic  CLI 
  217. uses when processing a command, stated simply, is as follows:
  218.  
  219.      1.   Break command line into its parts (keyword and parameters)
  220.      2.   Check if keyword is a symbol, if it is: replace keyword with
  221.           the value of the symbol, search replaced value for parameter
  222.           substitution characters and replace where necessary.
  223.      3.   Scan parameter string for symbol substitution characters and
  224.          replace where necessary.
  225.      4.   Lookup keyword in internal command table, branch to internal
  226.           command dispatcher if found, prompt again.
  227.      5.   Pass entire command string to DOS, prompt again
  228.  
  229. CLI also allows for command chaining when commands are entered on the  command 
  230. line.  Multiple commands may be entered separating each with a semicolon.  For 
  231. example  suppose you wanted to change your current working directory to  EXPE-
  232. DITE  on the current logged device and execute the batch file EXP.BAT in  that 
  233. directory.  To  do so you could key them as separate commands or key  them  as 
  234. chained commands. First as separate commands:
  235.  
  236.           > cd \expedite
  237.           > exp
  238.  
  239. As Chained commands:
  240.  
  241.           > cd \expedite;exp
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.                        CLI Internal Commands
  249.  
  250.      The commands in this section are all processed by CLI internally. Gener-
  251. ally you need not spell out an entire internal command in order to get CLI  to 
  252. execute  it. Only the number of characters needed to make the  command  unique 
  253. need  be  specified. For example, to distinguish between the  DEFINE  and  DOS 
  254. commands, you would need to specify DE for DEFINE and DO for DOS, whereas  you 
  255. need  only  specify C for the CLEAR command because it is currently  the  only 
  256. internal  command that begins with an C. We do not recommend  using  abbrevia-
  257. tions  in command definition files as future releases of CLI may  include  new 
  258. internal commands that would cause your abbreviations to no longer be unique.
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267. CLEAR     CLEAR                    Clear
  268.      Clears  the screen and displays the running banner on line one.
  269.  
  270. DEFINE     DEFINE <option> <parameters>  DEFINE LOGICAL BIN C:\PGMS\BIN
  271.      Define entity (logical name or symbol) to CLI or set value of flag.
  272.      The option portion of this command is also a keyword and may be
  273.      abbreviated as discussed above. The above example of defining the
  274.      logical name BIN could have been typed as:  DE L BIN C:\PGMS\BIN.
  275.      Logical names are generally used as short hand for device and path
  276.      specifications, similar in function to the DOS SUBST command. Symbols
  277.      are generally used as short hand for DOS command strings. Symbols 
  278.      also allow for recognition and parameter substitution. The best way
  279.      to explain what this means is by example. Suppose you wanted to define
  280.      a symbol that would allow you to type the contents of a DOS file
  281.      to the screen with pagination. How would you do it? First, the
  282.      DOS command to do this is:   TYPE myfile.txt | MORE. By defining a
  283.      symbol to CLI we can do this much more simply. Choosing the name LIST
  284.      for our symbol, LIST should be defined as follows:
  285.  
  286.           DEFINE SYMBOL LI*ST TYPE % | MORE
  287.  
  288.      Then, to type myfile.txt to the screen with pagination, we simply type
  289.      LI myfile.txt on the command line. Note the use of the asterisk in the
  290.      LIST symbol definition. A asterisk is used to tell CLI that you want
  291.      CLI to recognize the symbol when you type the characters that precede
  292.      it. Therefore when you type LI, LIS, or LIST, CLI will recognize it
  293.      as your LIST symbol. Also note the use of the percent sign in the
  294.      definition. Percent signs are used to denote parameter substitutions.
  295.      CLI will replace the first percent sign with the first parameter, the 
  296.      second with the second and so on.  
  297.  
  298.           DEFINE LOGICAL <name> <translation> DEFINE LOGICAL BIN C:\PGMS\BIN
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.           DEFINE SYMBOL <name> <translation>  DEFINE SYMBOL TY TYPE
  306.           DEFINE VERIFY <ON|OFF>           DEFINE VERIFY ON
  307.                If on, echo commands.
  308.  
  309. DOS       DOS
  310.      Spawn to DOS
  311.  
  312. EXIT      EXIT|QUIT            EXIT
  313.      Terminate CLI and returns to DOS
  314.  
  315. GETFL     GETFL <file name>          GETFL CLISETUP.DAT
  316.                                    @CLISETUP.DAT
  317.      Read and process CLI commands in file <file name>. The file 
  318.      specified to the GETFL command contains CLI commands one command
  319.      per line. Spacing is not important other than if a space is required
  320.      such as between keywords and parameters, then at least one must be
  321.      used. You may use an exclamation point at any time to denote a
  322.      comment. All text following the exclamation point is ignored.
  323.  
  324. RECALL     RECALL
  325.      Use the RECALL command to popup a menu of the last 20 entered
  326.      commands. Select one by using the up and down arrow keys to highlight
  327.      your selection and press return. The selected command will appear
  328.      on the command line and may be edited prior to executing it. If you
  329.      depress ESC while the popup menu is displayed, no command is selected
  330.      and the popup window is closed.
  331.  
  332. SHOW      SHOW <what> <options>  SHOW LOGICAL BIN
  333.           SHOW CORE
  334.                Show heap bytes remaining.
  335.  
  336.           SHOW DATE
  337.                Show Current date and time
  338.  
  339.           SHOW ENVIRONMENT
  340.                Show current DOS environmental variables (established with DOS
  341.                SET command)
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.           SHOW LOGICAL <name>    SHOW LOGICAL BIN
  349.                               SHOW LOGICAL
  350.                Show translation of specified logical name. If no name is
  351.                specified all currently defined logical names will be shown.
  352.  
  353.           SHOW SYMBOL <name>     SHOW SYMBOL TY
  354.                               SHOW SYMBOL
  355.                Show translation of specified symbol. If no name is
  356.                specified all currently defined symbols will be shown.
  357.  
  358.           SHOW TIME
  359.                Show current date and time.
  360.  
  361.           SHOW VERSION
  362.                Show current CLI version.
  363.  
  364. SD        SD <logical|path>     SD BIN
  365.      SD stands for 'set default'. The SD command will set your current
  366.      logged device and working directory to the path specified by its
  367.      parameter.
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374. NOTES
  375.  
  376.      o    CLI traps and processes the following three DOS commands:
  377.           CD, PROMPT, and SET. The functionality is the same as provided
  378.           by DOS.
  379.  
  380.      o    At any time CLI is prompting for a command, you may use the 
  381.           up and down arrow keys to recall up to the twenty previously
  382.           entered commands. You may toggle between edit insert or
  383.           overstrike mode my pressing the INSERT key.
  384.  
  385.      o    If command chaining is used on the command line, the entire
  386.           line is placed in the recall area. As each command is processed
  387.           it is also stacked for recall. This allows the entire sequence
  388.           to be recalled or any one of the  pieces.
  389.  
  390.      o    When CLI is exited, the DOS environment is restored to what it
  391.           was prior to CLI being invoked. Therefore the changes made  by
  392.           any SET, PROMPT, APATH, or RPATH commands will be lost. 
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.                      Appendix A.  Some Examples
  400.  
  401.      It  is  possible to combine some of the features discussed  through  out 
  402. this manual to create a DOS environment that is unique to you. Listed here are 
  403. some of the symbol definitions and logical names that the developers at  ESHEC 
  404. use. Although we have included some very specific examples this of course   is 
  405. not  our  complete  list because ours, just as yours will become  to  you,  is 
  406. unique to us.
  407.  
  408.  
  409.  
  410.  
  411.  
  412.               Command    Logical Name         Equivalence
  413.  
  414.           DEFINE LOGICAL DOS                  C:\DOS
  415.           DEFINE LOGICAL PARA*DOX3            C:\PARADOX3
  416.           DEFINE LOGICAL PCTOOLS              D:\PCTOOLS
  417.           DEFINE LOGICAL PCPLUS               C:\UTIL\PCPLUS
  418.           DEFINE LOGICAL TC                   C:\T\TC\BIN
  419.           DEFINE LOGICAL TOPC                 C:\
  420.           DEFINE LOGICAL TOPD                 D:\
  421.           DEFINE LOGICAL EDT$                 C:\UTIL\EDTV5
  422.           DEFINE LOGICAL ZIP$                 C:\UTIL\PZK110
  423.  
  424.  
  425.              Command     Symbol Name          Equivalence
  426.  
  427.           DEFINE SYMBOL  BKUP                 PCTOOLS:PCBACKUP.EXE
  428.           DEFINE SYMBOL  CAT                  DIR % | SORT | MORE
  429.           DEFINE SYMBOL  EDIT                 EDT$:EDT.EXE
  430.           DEFINE SYMBOL  EDT                  'EDIT'
  431.           DEFINE SYMBOL  ER*ASE               ERASE
  432.           DEFINE SYMBOL  GO                   SD
  433.           DEFINE SYMBOL  GREP                 TC:GREP.COM
  434.           DEFINE SYMBOL  LI*ST                TYPE % | MORE
  435.           DEFINE SYMBOL  LH*ARC               C:\UTIL\LHARC\LHARC
  436.           DEFINE SYMBOL  LN                   SHOW LOGICAL
  437.           DEFINE SYMBOL  PA*GE                'LI'
  438.           DEFINE SYMBOL  PCP*LUS              PCPLUS:PCPLUS.EXE
  439.           DEFINE SYMBOL  SEA*RCH              'GREP' -i+ -n+
  440.           DEFINE SYMBOL  SS                   SHOW SYMBOL
  441.           DEFINE SYMBOL  UNZIP                ZIP$:PKUNZIP.EXE
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.                     Appendix B.  CLI and DESQview
  449.  
  450.      CLI  will only run in a small DESQview window on 386 (also SX), and  486 
  451. machines.  286 and 80x8 machines running DV must execute CLI in a full  screen 
  452. window.  Although CLI was written to be DV aware, full functionality  was  not 
  453. provided  in the Shareware version. Please note however that at no  time  does 
  454. CLI  attempt to compensate for 'ill' behaved programs in a  DESQview  environ-
  455. ment.  Most  often, users of CLI and DV will use CLI in lieu of DV's  big  DOS 
  456. window.
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.                    Appendix C.  CLI Known problems
  464.  
  465.      In  this section we will try to answer some of the questions  that  have 
  466. already been posed to the CLI developers and identify some of CLI  idiosyncra-
  467. sies. 
  468.  
  469.       1.  Why does CLI take up so much memory?
  470.  
  471.           We know that the CLI program take more memory than some would
  472.           like. As CLI was developed as an in-house tool for us, size
  473.           didn't much matter. We were more concerned with convenience
  474.           and speed. If CLI is accepted by the PC community, one of our
  475.           first efforts in a future release of the registered version
  476.           will be to reduce its memory requirements.
  477.  
  478.       2.  Why can't I use command chaining in a symbol definition?
  479.  
  480.           Currently command chaining is provided only on the command line.
  481.           It is our intent in a future release of the register version of
  482.           CLI to provide chaining functionality in symbols, thereby
  483.           allowing a symbol to act as a mini batch file.
  484.  
  485.       3.  What is CLI written in?
  486.  
  487.           CLI is written entirely in Borland C. Borland's BORLAND C++
  488.           compiler is used to build the CLI executable.
  489.  
  490.       4.  What does CLI use to access the video screen?
  491.  
  492.           CLI writes directly to video memory for all of its own output
  493.           by using BORLAND C's video routines. This allows for the fastest
  494.           possible  screen  displays and the prompt string to  contain  ANSI
  495.           escape  sequences. Of course if you do use the $E in your  
  496.           prompt, then ANSI.SYS must be loaded. (Note: the registered
  497.           version allows you to specify BIOS video)
  498.  
  499.       5.  Does CLI change my AUTOEXEC.BAT or CONFIG.SYS files?
  500.  
  501.           No. CLI makes no attempt to change either of these.
  502.  
  503.       6.  Does CLI do any special interrupt handling?
  504.  
  505.           No. CLI makes no attempt to control any of the PC's interrupts.
  506.           Nor does it do any interrupt trapping.
  507.  
  508.       7.  Can I use the function keys with CLI?
  509.  
  510.           Not at this time. We anticipate providing this option in a
  511.           future release of the registered version of CLI.
  512.  
  513.       8.  Can I change CLI's use of color?
  514.  
  515.           Yes. However this option is provided only in the registered
  516.           version.
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.       9.  Can I remove CLI's signature at the beginning of the prompt?
  525.  
  526.           Yes. However this option is provided only in the registered
  527.           version.
  528.  
  529.      10.  Can I change the size of the recall stack?
  530.  
  531.           Not at this time. We anticipate providing this option in a
  532.           future release of the registered version of CLI.
  533.  
  534.      11.  Can I have CLI automatically load my setup when it starts?
  535.  
  536.           Yes. CLI will look in the directory it was started from for
  537.           a file CLISETUP.DAT. If found, CLI will issue a:
  538.           GETFL CLISETUP.DAT for you.
  539.  
  540.      12.  How do I become a registered user and what do I get?
  541.  
  542.           Read the file REGISTER.TXT included on the distribution.
  543.  
  544.  
  545.